<template>
    <van-nav-bar left-text="编辑地址" left-arrow @click-left="onClickLeft" />
    <van-address-edit
        :area-list="areaList"
        show-postal
        show-delete
        show-set-default
        :area-placeholder="areaPlaceholder"
        :area-columns-placeholder="['请选择', '请选择', '请选择']"
        @save="onSave"
        @delete="onDelete"
        :address-info="form"
    />
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useAddressEmit } from '@/hooks/addressEmit';
const {onClickLeft,onSave,onDelete,areaList,form,areaPlaceholder} =useAddressEmit()
// const form = ref({name:'jack',phone:'1212121342',textarea:'textarea',areaCode:2323})

// const form = ref({name:'jack',tel:'1212121342',addressDetail:'textarea'})
</script>

<style scoped>
:deep(.van-icon:before) {
    color: rgb(34, 34, 34);
    font-size: 20px;
}
:deep(.van-nav-bar__text) {
    color: rgb(19, 19, 19);
    font-size: 16px;
    font-weight: 500;
}
</style>
